# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=mkcert
pkgver=1.4.4
pkgrel=9
pkgdesc="simple zero-config tool to make locally trusted development certificates with any names you'd like"
url="https://mkcert.dev/"
arch="all"
license="BSD-3-Clause"
makedepends="go nss-tools"
options="chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/FiloSottile/mkcert/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go generate
	go build -ldflags "-X main.Version=$pkgver" -v
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
480672618df409f153535f42ed4777447635b2ac78e38d9cc62aa9baa47b074aa01fa94ade4666f9ad31bf870caec53e5f0de69791c5e094a911d59f82382b05  mkcert-1.4.4.tar.gz
"
